Skip to content

cache: fix cache proto's max_body_bytes type #12273

Closed
enozcan wants to merge 7 commits intoenvoyproxy:mainfrom
enozcan:config-type-fix
Closed

cache: fix cache proto's max_body_bytes type #12273
enozcan wants to merge 7 commits intoenvoyproxy:mainfrom
enozcan:config-type-fix

Conversation

@enozcan
Copy link

@enozcan enozcan commented Jul 24, 2020

Commit Message: Change max_body_bytes type in cache.proto to uint64.

Additional Description: uint64_t is used for response body sizes in cache filter (AdjustedByteRange, LookupResult::content_length_ etc.) where max_body_bytes field is uint32 in cache.proto. Related discussion with @toddmgreer : #10536 (comment)

I also wonder how to change (or generate) these fields under generated_api_shadow as it says: Do not hand edit any file under envoy/ and as I see they are not generated after build.

Risk Level: No usage of this field exists.
Testing: N/A
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Enes Ozcan <enes.ozcan@hazelcast.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy[\w/]*/(v1alpha\d?|v1|v2alpha\d?|v2))|(api/envoy/type/(matcher/)?\w+.proto).
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #12273 was opened by enozcan.

see: more, trace.

toddmgreer
toddmgreer previously approved these changes Jul 24, 2020
@zuercher
Copy link
Member

You can regenerate the shadow API files by running tools/proto/proto_format.sh.

Signed-off-by: Enes Ozcan <enes.ozcan@hazelcast.com>
@alyssawilk
Copy link
Contributor

Sorry, we've been having some CI issues lately. Can you try a master merge to see if it sorts out CI unhappiness?

Signed-off-by: Enes Ozcan <enes.ozcan@hazelcast.com>
@stale
Copy link

stale bot commented Aug 8, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Aug 8, 2020
Signed-off-by: Enes Ozcan <enes.ozcan@hazelcast.com>
Signed-off-by: Enes Ozcan <enes.ozcan@hazelcast.com>
@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Aug 10, 2020
Copy link
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/wait

// Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache
// storage implementation may have its own limit beyond which it will reject insertions).
uint32 max_body_bytes = 4;
uint64 max_body_bytes = 4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can't change the v2 protos now.

// Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache
// storage implementation may have its own limit beyond which it will reject insertions).
uint32 max_body_bytes = 4;
uint64 max_body_bytes = 4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we need to deprecate this field and make a new one with the different type. @htuch ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the question is do we realistically expect to have cache objects > 4GB? If yes, then let's do this new/old deprecation dance, otherwise let's handle the type mismatch in the implementation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@toddmgreer Should we commit to 4G limit in cacheable object sizes? Seems OK to me.

Maybe in practicality, as there are no real impls of this filter yet, it doesn't matter if we change the type as there's no outstanding data to be compatible with.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why anyone would want to set a size limit that's higher than 4G, but I have no objection to allowing it. I also have no objection to leaving it as is.

@toddmgreer
Copy link
Contributor

toddmgreer commented Aug 18, 2020 via email

jmarantz
jmarantz previously approved these changes Aug 18, 2020
Copy link
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry -- we still need to back out the v2 change.

Then @htuch needs to approve for the API change.

@jmarantz jmarantz dismissed their stale review August 18, 2020 12:32

Not passing CI, as you can't change v2 anymore.

@htuch
Copy link
Member

htuch commented Aug 18, 2020

We're actually stricter than wire compatibility and need to ensure we don't break language bindings as well, see https://github.com/envoyproxy/envoy/blob/master/api/API_VERSIONING.md#backwards-compatibility.

@toddmgreer
Copy link
Contributor

toddmgreer commented Aug 18, 2020 via email

@htuch
Copy link
Member

htuch commented Aug 19, 2020

Possibly, @envoyproxy/api-shepherds WDYT? I'd ask for you to update the style guide at the same time if we do this.

@mattklein123
Copy link
Member

Fine with me!

@stale
Copy link

stale bot commented Aug 29, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Aug 29, 2020
Signed-off-by: Enes Ozcan <enes.ozcan@hazelcast.com>
Signed-off-by: Enes Ozcan <enes.ozcan@hazelcast.com>
@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Sep 1, 2020
@enozcan
Copy link
Author

enozcan commented Sep 1, 2020

@jmarantz Reverted v2 protos and I wonder if there should be any further changes - docs, deprecations, etc. regarding the conversations above.

@stale
Copy link

stale bot commented Sep 11, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Sep 11, 2020
@mattklein123 mattklein123 removed the stale stalebot believes this issue/PR has not been touched recently label Dec 9, 2020
Copy link
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lost track of this PRl. Is this still active?

// Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache
// storage implementation may have its own limit beyond which it will reject insertions).
uint32 max_body_bytes = 4;
uint64 max_body_bytes = 4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@toddmgreer Should we commit to 4G limit in cacheable object sizes? Seems OK to me.

Maybe in practicality, as there are no real impls of this filter yet, it doesn't matter if we change the type as there's no outstanding data to be compatible with.

@jmarantz
Copy link
Contributor

/wait

Base automatically changed from master to main January 15, 2021 23:01
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Feb 22, 2021
@github-actions
Copy link

github-actions bot commented Mar 2, 2021

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot closed this Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api stale stalebot believes this issue/PR has not been touched recently v2-freeze waiting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants